﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMessageBox>
#include <QDebug>
#include <QStandardItemModel>
#include <QFileDialog>
#include <QFile>
#include <QTextStream>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actOpenTeacher_triggered();

    void on_actOpenCourse_triggered();

    void on_actTeacher_triggered();

    void on_actCourse_triggered();

    void on_cheEditCourse_stateChanged(int arg1);

    void on_cheEditTeacher_stateChanged(int arg1);

    void on_btnAppend_clicked();

    void on_btnAppendCourse_clicked();

    void on_btnDeleteCourse_clicked();

    void on_btnDelete_clicked();

    void on_btnFindTeacher_clicked();

    void on_btnFindCourse_clicked();

    void on_actSaveTeacher_triggered();

    void on_actSaveCourse_triggered();

private:
    Ui::MainWindow *ui;

    void init();

    QStandardItemModel* m_teacherModel;
    QStandardItemModel* m_courseModel;

    void initTeacherModel();
    void initCourseModel();

};
#endif // MAINWINDOW_H
